{?set jieqi_page_rows = "10"?}

{?if $newpost > 0?}
<div class="textbox hot" id="postresult">{?$postresult?}</div>
<script type="text/javascript">
setTimeout(function(){$_('postresult').hide()}, 3000);
</script>
{?/if?}
<div class="cf pd">
	<div class="fl"><a href="{?$url_articleinfo?}">《{?$articlename?}》</a> 书评回复</div>
	<div class="fr">[<a href="{?$article_dynamic_url?}/reviews.php?aid={?$articleid?}&type=all">全部书评</a>] &nbsp;&nbsp; [<a href="{?$article_dynamic_url?}/reviews.php?aid={?$articleid?}&type=good">精华书评</a>]</div>
</div>

<table class="grid" width="100%">
<caption>主题：{?$title?}</caption>
<tbody id="jieqi_page_contents">
{?section name=i loop=$replyrows?}
    <tr>
        <td class="tdl" width="20%" valign="top">
		<div style="padding:10px;">
		{?if $replyrows[i].userid > 0?}
			<img src="{?function jieqi_geturl:'system':'avatar':$replyrows[i].userid:'l':$replyrows[i].avatar?}" class="avatar" alt="头像"><br />
			<strong><a href="{?function jieqi_geturl:'system':'user':$replyrows[i].userid?}" target="_blank">{?$replyrows[i].username?}</a></strong>{?if $replyrows[i].isvip_n > 0?}<span class="hot">[VIP]</span>{?/if?}<br />
  			{?if $jieqi_modules['badge']['publish'] > 0?}
  				{?if $replyrows[i].groupurl != ""?}<img src="{?$replyrows[i].groupurl?}" border="0" title="{?$replyrows[i].groupname?}"><br />{?/if?}
				{?if $replyrows[i].honorurl != ""?}<img src="{?$replyrows[i].honorurl?}" border="0" title="{?$replyrows[i].honor?}"><br />{?/if?}
  				{?section name=j loop=$replyrows[$i['key']]['badgerows']?}
				<img src="{?$replyrows[$i['key']]['badgerows'][$j['key']]['imageurl']?}" border="0" title="{?$replyrows[$i['key']]['badgerows'][$j['key']]['caption']?}">
				{?/section?}
				{?if $replyrows[$i['key']]['badgerows']|count > 0?}<br />{?/if?}
			{?else?}
				{?$replyrows[i].groupname?}<br />
				{?$replyrows[i].honor?}<br />
  			{?/if?}
			加入日期：{?$replyrows[i].regdate|date:"Y-m-d"?}<br />
			经　　验：{?$replyrows[i].experience?}<br />
			积　　分：{?$replyrows[i].score?}<br /><br />
			<a href="javascript:;" onclick="openDialog('{?$jieqi_url?}/newmessage.php?receiver={?$replyrows[i].useruname|urlencode?}&ajax_gets=jieqi_contents', false);">发送消息</a> | <a id="addfriends{?$i['order']?}" href="javascript:;" onclick="Ajax.Tip('{?$jieqi_url?}/addfriends.php?id={?$replyrows[i].userid?}&act=add{?$jieqi_token_url?}', {method: 'POST'});">加为好友</a><br />
			<a href="{?function jieqi_geturl:'system':'user':$replyrows[i].userid?}" target="_blank">查看资料</a> | <a href="{?$jieqi_url?}/ptopics.php?oid={?$replyrows[i].userid?}" target="_blank">会 客 室</a>
		{?else?}
			<strong>游客</strong><br /><br /><br /><br /><br />
		{?/if?}
		</div>
		</td>
        <td class="tdr" width="80%" valign="top">
		<div class="cf">
		<div class="fl"><strong>{?$replyrows[i].subject?}</strong></div>
		<div class="fr nw">{?$replyrows[i].posttime|date:"Y-m-d H:i:s"?}
		{?if $jieqi_userid == $replyrows[i].posterid || $jieqi_userstatus == 2?} | 
		<a href="{?$jieqi_modules['article']['url']?}/reviewedit.php?yid={?$replyrows[i].postid?}">编辑</a>
		{?/if?}
		{?if $ismaster == 1?} | {?if $replyrows[i].istopic == 1?}
		<a id="act_delt_{?$topicid?}" href="javascript:;" onclick="if(confirm('确实要删除该书评么？')) Ajax.Tip('{?$jieqi_modules['article']['url']?}/reviews.php?aid={?$articleid?}&rid={?$topicid?}&act=del{?$jieqi_token_url?}', {method: 'POST'});">删除</a>
		{?else?}
		<a id="act_delp_{?$replyrows[i].postid?}" href="javascript:;" onclick="if(confirm('确实要删除该回复么？')) Ajax.Tip('{?$jieqi_modules['article']['url']?}/reviewshow.php?aid={?$articleid?}&rid={?$topicid?}&did={?$replyrows[i].postid?}&act=del{?$jieqi_token_url?}', {method: 'POST'});">删除</a>
		{?/if?}{?/if?}
		 | <a href="#yid{?$replyrows[i].postid?}" name="yid{?$replyrows[i].postid?}">{?$replyrows[i].order?}#</a>{?if $replyrows[i].display == 1?} <span class="warning">待审</span>{?/if?}&nbsp;
		</div>
		</div>
		<hr />
		<div>{?$replyrows[i].posttext?}</div>
		</td>
    </tr>
{?/section?}
</tbody>
</table>
<div class="pages">{?$url_jumppage?}</div>

<a name="postnew"></a>
{?if $enablepost == 1?}
<script type="text/javascript">
function frmpost_validate(){
  if(document.frmpost.pcontent.value == ""){
    alert("请输入内容");
    document.frmpost.pcontent.focus();
    return false;
  }
}
</script>
<form name="frmpost" id="frmpost" method="post" action="{?$article_dynamic_url?}/reviewshow.php?tid={?$topicid?}&aid={?$articleid?}" onsubmit="return frmpost_validate();" enctype="multipart/form-data">
<table class="grid" width="100%" align="center">
  <caption>回复书评</caption>
  <tr>
    <td class="tdl" width="20%">内容：</td>
    <td class="tdr" width="80%"><textarea class="textarea" name="pcontent" id="pcontent" cols="60" rows="12"></textarea>
    <script type="text/javascript">loadJs("{?$jieqi_url?}/scripts/ubbeditor_{?$jieqi_charset?}.js", function(){UBBEditor.Create("pcontent");});</script>
    </td>
  </tr>
{?if $postcheckcode > 0?}
<tr>
  <td class="tdl">验证码：</td>
  <td class="tdr"><input type="text" class="text" style="width:6em;" name="checkcode" id="checkcode" onfocus="if(this.form.imgccode.style.display == 'none'){this.form.imgccode.src = '{?$jieqi_url?}/checkcode.php?rand={?$jieqi_time?}';this.form.imgccode.style.display = '';}" title="点击显示验证码"><img name="imgccode" src="" style="cursor:pointer;vertical-align:middle;margin-left:3px;display:none;" onclick="this.src='{?$jieqi_url?}/checkcode.php?rand='+Math.random();" title="点击刷新验证码"></td>
</tr>
{?/if?}
  <tr>
    <td class="tdl">&nbsp;<input type="hidden" name="act" value="newpost" />{?$jieqi_token_input?}</td>
    <td class="tdr"><button type="submit" name="Submit" class="button"> 回复书评 </button></td>
  </tr>
</table>
</form>
{?else?}
<table class="grid" width="100%" align="center">
  <caption>回复书评</caption>
  <tr>
    <td align="center"><br />您不能回复书评，如果尚未登录，请先点击 <a class="hot" href="{?$jieqi_user_url?}/login.php" onclick="openDialog('{?$jieqi_user_url?}/login.php?ajax_gets=jieqi_contents', false);stopEvent();">登录</a><br /><br /></td>
  </tr>
</table>
{?/if?}